﻿using System;

namespace Yuchen.NPA.Core.CompilerService.RegularExpression
{
    internal class StarNode : Node
    {
        public override NodeType Type { get; } = NodeType.Star;

        public StarNode(Node node) : base(new[] { node })
        {
            if (node == null)
            {
                throw new ArgumentNullException(nameof(node));
            }
        }

        public override string ToString()
        {
            return $"{Children[0]}*";
        }
    }
}
